package cn.jobstart.vo;

import cn.jobstart.common.StringUtil;
import cn.jobstart.common.YXDate;
import cn.jobstart.pubInter.FrontController;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * @author sunke
 * @Date 2023-09-06 14:17:00
 * @description ResumeBasicDetailDomainVO      简历基础表
 */

@Data

@ApiModel("简历基础表DetailDomainVO")
public class ResumeBasicDetailDomainVO extends ResumeBasicDomainVO {


    @ApiModelProperty("原始简历")
    private String fullOldResumeFile;
    private String fullImg;

    public String getFullOldResumeFile() {
        fullOldResumeFile = FrontController.getIntactImg(getOldResumeFile());
        return fullOldResumeFile;
    }

    @Override
    public Integer getAge() {

        if (StringUtil.isNotObjEmpty(getBirthday())) {
            return YXDate.getYearSub(getBirthday(), new Date());
        }
        return super.getAge();
    }

    public String getFullImg() {
        fullImg = FrontController.getIntactImg(getImg());
        return fullImg;
    }
}